<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        //1.  1,1,2,3,5,8,13,21
        var n1 = 1;
        var n2= 1;
        var sum2 = 0;
        for(var b =3; b<=12; b++){
           sum2 = n1 + n2;
           n1 = n2;
           n2 = sum2;
        }
        console.log(sum2);

        // 2.  1*1 =1 
            //    1*2 =1 2*2 =4
            document.write("<table border='1px'>")
            for(var a =1; a<=9; a++){
                document.write("<tr>")
                for(var b=1; b<= a; b ++){
                    document.write("<td>")
                    document.write(a + "*" + b + "=" + a*b)
                    document.write("</td>")
                }
                document.write("</tr>")
            }
            document.write("</table>")
 
        // 3 打印 正方形
        for(var a =1; a < 10; a++){
            for(var b = 1; b < a; b++){
                document.write("星")
            }
            document.write("<br/>")
        }
    </script>
</body>
</html>
